package day003;

public class ControlTest {
    public static void main(String[] args) {
        double dayMoney = 2.5;

        double sumMoney = 0;
        int result = 100;
        int dayCount = 1;

        while (true) {
            sumMoney += dayMoney;

            if (sumMoney >= result) {
                break;
            }

            if (dayCount % 5 == 0) {
                sumMoney -= 6;
                System.out.println("第" + dayCount + "天花了6元");
            }

            dayCount++;
        }

        System.out.println("共花了" + dayCount + "天存了100元！");
    }
}
